package cn.smdq.ch.common.vo;

import cn.smdq.ch.common.constant.CommonConstants;
import lombok.Data;

/**
 * @author shuimodanqing
 * create at:  2019/1/29  11:39 AM
 * @description 前端返回结果
 */
@Data
public class Result {

    private int code;

    private String msg;

    private Object data = "";

    public Result(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Result(String msg, Object data) {
        this.code = CommonConstants.SUCCESS_CODE;
        this.msg = msg;
        this.data = data;
    }

    public Result(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
}
